# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: Marcel Korpel <marcel[dot]korpel[at]gmail>
# Contributor: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Jeff Mickey <jeff@archlinux.org>

pkgname=ctemplate
pkgver=2.4
pkgrel=2
pkgdesc='A library implementing a simple but powerful template language for C++'
arch=('loong64' 'x86_64')
url='https://github.com/olafvdspek/ctemplate'
license=('BSD')
makedepends=('python')
depends=('gcc-libs' 'perl')
source=("https://github.com/OlafvdSpek/${pkgname}/archive/${pkgname}-${pkgver}.tar.gz")
sha256sums=('ccc4105b3dc51c82b0f194499979be22d5a14504f741115be155bd991ee93cfa')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"

	autoreconf -fi
}

build() {
	cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"

	./configure \
		--prefix=/usr
	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"

	make DESTDIR="${pkgdir}" install
	install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
